#ifndef MAPPERAXROM_H
#define MAPPERAXROM_H
#include "Mapper.h"
#include "PictureBus.h"

PNE_NAMESPACE_BEGIN

struct MapperAxROM: public Mapper {
    MapperAxROM(Cartridge &cart, std::function<void(void)> mirroring_callback);

    void WritePRG(Address addr, Byte value) override;
    Byte ReadPRG(Address addr) override;
    Byte ReadCHR(Address addr) override;
    void WriteCHR(Address addr, Byte value) override;

    NameTableMirroring GetNameTableMirroring();

    private:
    NameTableMirroring m_mirroring;
    std::function<void(void)> m_mirroringCallback;
    uint32_t m_prgBank;
    std::vector<Byte> m_characterRAM;
};

PNE_NAMESPACE_END
#endif // MAPPERAXROM_H
// DONE